package model

import (
	"gorm.io/gorm"
	"time"
)

type BaseModel struct {
	ID        int32     `gorm:"primarykey"`
	CreatedAt time.Time `gorm:"column:add_time"`
	UpdatedAt time.Time `gorm:"column:update_time"`
	DeletedAt gorm.DeletedAt
	IsDeleted bool
}

// Users
/*
1. 密文 2. 密文不可反解
	1. 对称加密
	2. 非对称加密
	3. md5 信息摘要算法
	密码如果不可以反解，用户找回密码
*/
type Users struct {
	ID            int32   `gorm:"column:id"`
	Phone         string  `gorm:"column:phone"`
	Sex           int32   `gorm:"column:sex"`
	Birthday      string  `gorm:"column:birthday"`
	Constellation string  `gorm:"column:constellation"`
	Salt          string  `gorm:"column:salt"`
	Pass          string  `gorm:"column:pass"`
	NickName      string  `gorm:"column:nickname"`
	HeadImgUrl    string  `gorm:"column:headimgurl"`
	LoginIp       string  `gorm:"column:login_ip"`
	System        string  `gorm:"column:system"`
	Channel       string  `gorm:"column:channel"`
	Appid         int32   `gorm:"column:appid"`
	ZhuxiaoTime   string  `gorm:"column:zhuxiao_time"`
	Status        int32   `gorm:"column:status"`
	CreatedAt     string  `gorm:"column:created_at"`
	City          string  `gorm:"column:city"`
	IsSign        int32   `gorm:"column:is_sign"`
	IsAccept      int32   `gorm:"column:is_accept"`
	RyUid         string  `gorm:"column:ry_uid"`
	RyToken       string  `gorm:"column:ry_token"`
	IdNo          string  `gorm:"column:idno"`
	IsIdCard      int32   `gorm:"column:is_idcard"`
	MiZuan        float64 `gorm:"column:mizuan"`
	MiBi          float64 `gorm:"column:mibi"`
	SqDisable     int32   `gorm:"column:sq_disable"`
	SjDisable     int32   `gorm:"column:sj_disable"`
}
